﻿




using System.Web.Mvc;
using System.Web.Routing;

namespace Hotpot.Plugins
{
    public class PluginTemplateContext : RequestContext
    {
        public PluginTemplateContext(PluginTemplateContext context)
            : base(context.HttpContext, context.RouteData)
        {
            PageName = context.PageName;
        }

        public PluginTemplateContext(ResultExecutedContext context)
            : base(context.HttpContext, context.RouteData)
        {
            PageName = context.Result is ViewResult ? ((ViewResult)context.Result).ViewName : null;
        }

        public string PageName { get; private set; }
    }
}
